package main

import (
	"flag"

	kactor "kiwi/actor"
	kapp "kiwi/app"
	klog "kiwi/log"
	ktservice "kiwi/tests/service"
)

var (
	flagConfigPath = flag.String("cfg", "./test.json", "")
)

func main() {
	ktservice.Init()

	flag.Parse()

	kactor.Init("root", nil)
	defer kactor.Final()

	klog.Init(nil)
	defer klog.Final()

	a := kapp.MustCreate(*flagConfigPath)

	//a.AddOnce(srandom.Duration(1*time.Second, 3*time.Second), 0, func(ctx sadefine.Context, id satimer.ID, tag satimer.Tag) {
	//	panic("test")
	//})

	a.WaitForStopped()
}
